package us.icitap.commandcenter.business.ejb.persistence;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.TableGenerator;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

//@Entity
//@Table(name="CALL_GRADE_HISTORY",schema="MPC")
//@TableGenerator(name="GRADE_HISTORY_IDS",table="AUTO_IDS",valueColumnName="LAST_ID",initialValue=1, allocationSize=1)
public class CallGradeHistory implements Serializable {

	@Id
	@GeneratedValue(strategy=GenerationType.TABLE,generator="GRADE_HISTORY_IDS")
	private Integer id;
	
	@ManyToOne
	@JoinColumn(name="CALL_ID")
	private Call call;
	
	@ManyToOne
	@JoinColumn(name="GRADE_ID")
	private Grade grade;
	
	private String note;
	
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name="GRADE_DATE")
	private Date gradeDate;
	
	private boolean active;

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public Call getCall() {
		return call;
	}

	public void setCall(Call call) {
		this.call = call;
	}

	public Grade getGrade() {
		return grade;
	}

	public void setGrade(Grade grade) {
		this.grade = grade;
	}

	public String getNote() {
		return note;
	}

	public void setNote(String note) {
		this.note = note;
	}

	public Date getGradeDate() {
		return gradeDate;
	}

	public void setGradeDate(Date gradeDate) {
		this.gradeDate = gradeDate;
	}

	public boolean isActive() {
		return active;
	}

	public void setActive(boolean active) {
		this.active = active;
	}
	
	
}
